package com.zhuiyun.educations.api.learningrecord.service.impl;

import com.zhuiyun.educations.api.learningrecord.entity.DTO.LearningRecordEntityDTO;
import com.zhuiyun.educations.api.learningrecord.mapper.LearningRecordMapper;
import com.zhuiyun.educations.api.learningrecord.service.LearningRecordService;
import com.zhuiyun.educations.common.response.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName LearningRecordServiceImpl
 * @Description TODO
 * @Author cjl
 * @Date 2023/6/26 16:41
 **/
@Service
public class LearningRecordServiceImpl implements LearningRecordService {

    @Autowired
    LearningRecordMapper learningRecordMapper;

    @Override
    public CommonResult selectLearningRecordDTOByUserId(Integer userId) {
        List<LearningRecordEntityDTO> list = learningRecordMapper.selectLearningRecordDTOByUserId(userId);
        return CommonResult.ok(list);
    }
}
